import request from '@/utils/request'

function getCateOne(data) {
  return request({
    url:'/category/listOne',
    method:'get',
    params:data
  })
}

function getListByCateId(data) {
  return request({
    url:'/blog/getListByCateId/'+data,
    method:'get',
  })
}

function add(data) {
  return request({
    url:'/blog/save',
    method:'post',
    data
  })
}

function edit(data) {
  return request({
    url:'/blog/update',
    method:'put',
    data
  })
}

function getBlogById(data) {
  return request({
    url:'/blog/info/'+data,
    method:'get',
  })
}

function getLinks(data) {
  return request({
    url:'/link/list',
    method:'get'
  })
}

export default { getCateOne, getListByCateId, add, edit, getBlogById, getLinks }